package org.example.test3;

import java.util.concurrent.Semaphore;

class s {
    Semaphore t = new Semaphore(3);

    public void run(int i) {
        try {
            t.acquire();
            System.out.println(i + " is running");
            Thread.sleep(3000);
            t.release();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

